<?php
/*
 * 
 *  nginx   集成包  lnmp 
 *  
 *  
 *  
 配合.htaccess文件实现路由
 
		
server
	{
		listen       80;
		server_name 4318.com;
		root   /data/www/4318;
		index  index.php index.html index.htm;

		location ~ .*\.(php|php5)?$
			{
				try_files $uri =404;
				fastcgi_pass  unix:/tmp/php-cgi.sock;
				fastcgi_index index.php;
				include fcgi.conf;
			}

		location ~ \.php/?.*$ {
			set $script     $uri;
			set $path_info  "";
			if ($uri ~ "^(.+?\.php)(/.+)$") {
				set $script     $1;
				set $path_info  $2;
			}
			fastcgi_pass   127.0.0.1:9000;
			fastcgi_index  index.php;
			#fastcgi_param  SCRIPT_FILENAME  $document_root/$fastcgi_script_name;
			fastcgi_param  SCRIPT_FILENAME    $document_root$script;
			fastcgi_param  SCRIPT_NAME        $script;
			fastcgi_param  PATH_INFO          $path_info;
			include        fastcgi_params;
		}


		location /status {
			stub_status on;
			access_log   off;
		}

		location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
			{
				expires      30d;
			}

		location ~ .*\.(js|css)?$
			{
				expires      12h;
			}

		access_log  /data/logs/access.4318.log  access;

		include /data/www/4318/.htaccess;
	}

}
			
			
			
		
		
		
		
		 
		 
		 